package com.molin.enmuTest;

public enum Season {
    SRPING("chun"){
        @Override
        public void show() {

        }
        //如果枚举类中有抽象方法，那么在枚举项中必须全部重写

    },SUMMER("xia"){
        @Override
        public void show() {
            System.out.println(this.name);
        }
    },AUTUMN("qiu"){
        @Override
        public void show() {
            System.out.println(this.name);
        }
    },WINTER("dong"){
        @Override
        public void show() {
            System.out.println(this.name);
        }
    };

    public String name;

    //空参构造
//    private Season(){}
    //有参构造
    private Season(String name){this.name=name;}
    public abstract void show();
}
